import {
  ajax
} from "@/config/apiServer/axios-config.js";
import {
  URLS
} from "@/config/apiServer/urls.js";

// 支持币种列表
export function supTokens() {
  return ajax({
    type: "get",
    url: URLS.FLASH_SUP_TOKEN
  });
}

// 话费支持币种列表
export function feeSup() {
  return ajax({
    type: 'post',
    url: URLS.ASSETS_COMMON,
    params: {
      uri: "/backend/sbd/list",
      method: "get",
      params: {}
    }
  })
}

// 添加支持币种
export function addSupToken(params) {
  return ajax({
    type: 'post',
    url: URLS.ASSETS_COMMON,
    params: {
      uri: "/backend/sbd/add",
      method: "post",
      params: params
    }
  })
}

// 删除支持币种
export function delSupToken(currency) {
  return ajax({
    type: 'post',
    url: URLS.ASSETS_COMMON,
    params: {
      uri: "/backend/sbd/del",
      method: "post",
      params: {
        currency
      }
    }
  })
}

// 修改支持币种
export function editSupToken(params) {
  return ajax({
    type: 'post',
    url: URLS.ASSETS_COMMON,
    params: {
      uri: "/backend/sbd/edit",
      method: "post",
      params: params
    }
  })
}